import request from '@/utils/request'
export function getEmployeePage (params) {
  return request({
    url: '/api/employee/pageList',
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    },
    params
  })
}

export function addEmployee (params) {
  return request({
    url: '/api/employee/add',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}

export function updateEmployee (params) {
  return request({
    url: '/api/employee/update',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}

export function deleteEmployee (params) {
  return request({
    url: '/api/employee/delete',
    method: 'DELETE',
    params
  })
}

export function employeeDetail (params) {
  return request({
    url: '/api/employee/detail',
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    },
    params
  })
}

export function companyList (params) {
  return request({
    url: '/api/enterprise/list',
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    },
    params
  })
}